﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeChatParking.Core.Payment.Alipay
{
   
    //请求出错通知模型
   public class AlipayErrorModel
   {
         //====================基本参数=================
       /// <summary>
       /// 合作者身份ID
       /// </summary>
       public string Partner { get; set; }

       //====================业务参数=================

       /// <summary>
       ///商户网站唯一订单号
       /// </summary>
       public string OutTradeNo { get; set; }

       /// <summary>
       /// 错误码 
       /// </summary>
       public string ErrorCode { get; set; }

       /// <summary>
       /// 请求出错时的通知页面路径  
       /// </summary>
       public string ReturnUrl { get; set; }


       /// <summary>
       /// 卖家支付宝账号
       /// </summary>
       public string SellerEmail { get; set; }

       /// <summary>
       /// 买家支付宝账号
       /// </summary>
       public string BuyerEmail { get; set; }

       /// <summary>
       /// 卖家支付宝用户号   
       /// </summary>
       public string SellerID { get; set; } 

       /// <summary>
       /// 买家支付宝用户号   
       /// </summary>
       public string BuyerID { get; set; }


       public AlipayErrorModel(Dictionary<string, string> parameters)
       {
           Partner = parameters["partner"];
           OutTradeNo = parameters["out_trade_no"];
           ErrorCode = parameters["error_code"];
           ReturnUrl = parameters["return_url"];

           SellerEmail =parameters.ContainsKey("seller_email")== false ? null : parameters["seller_email"];
           BuyerEmail = parameters.ContainsKey("buyer_email") == false ? null : parameters["buyer_email"];
           SellerID = parameters.ContainsKey("seller_id") == false ? null : parameters["seller_id"];
           BuyerID = parameters.ContainsKey("buyer_id") == false ? null : parameters["buyer_id"];
         
       } 

      


    
    }
}
